package com.dyp.demo.OpenFeignDemo.ctr;

import com.dyp.demo.OpenFeignDemo.service.DemoWorkerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/abc")
public class RestfulCtr {
    @Autowired
    DemoWorkerService demoWorkerService;

    @RequestMapping(value = "{name}")
    public String sayHi1(@PathVariable(name = "name")
                         String name)
    {
        return demoWorkerService.sayName(name)  ;
    }
}
